]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ui: Reset workspace thumbnail porthole on monitor changes
authorShih-Yuan Lee (FourDollars) <fourdollars@debian.org>
Fri, 9 Jun 2017 10:26:11 +0000 (18:26 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 14 Jul 2017 13:01:48 +0000 (21:01 +0800)
The porthole will not be destroyed when the scale factor changed.
That makes workspace thumbnail porthole still wrong size in the first
seeing after the scale factor changed.

https://bugzilla.gnome.org/show_bug.cgi?id=765011

js/ui/workspaceThumbnail.js

index 980ffd665dcf8de4f4c4993aaed60767c9b22e9f..c5472bb2b299bdfa772b038ea7553e77987877e6 100644 (file)
@@ -676,6 +676,12 @@ const ThumbnailsBox = new Lang.Class({
         this._settings = new Gio.Settings({ schema_id: OVERRIDE_SCHEMA });
         this._settings.connect('changed::dynamic-workspaces',
             Lang.bind(this, this._updateSwitcherVisibility));
+
+        Main.layoutManager.connect('monitors-changed', Lang.bind(this, function() {
+            this._destroyThumbnails();
+            if (Main.overview.visible)
+                this._createThumbnails();
+        }));
     },
 
     _updateSwitcherVisibility: function() {